<%--
  Created by IntelliJ IDEA.
  User: 86138
  Date: 2024/11/30
  Time: 16:50
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>连续和计算</title>
</head>
<body bgcolor="cyan">
<h3>这是一个简单的JSP页面</h3>
<%
    // 计算1到100的连续和
    int sum = 0;
    for (int i = 1; i <= 100; i++) {
        sum += i;
    }
%>
<h4>1到100的连续和是：<%= sum %></h4>
</body>
</html>